package dom;

public class Text {
    public static void textFly(IFly ifly) {
    ifly.fly();
}
    public static  void textRun(IRun irun) {
        irun.run();
    }
    public  static void textSwim(ISwim iswim) {
        iswim.swim();
    }
    public static void main(String[] args) {
     Bird bird = new Bird();
     Dog dog = new Dog();
     Duck duck = new Duck();
     Frog frog = new Frog();
     bird.eat();//抽象方法
     dog.swim();
     duck.eat();
     frog.eat();
     dog.eat();//接口方法
     dog.run();
     bird.run();
     bird.fly();
     duck.run();
     duck.swim();
     frog.amphibious();
     frog.swim();
     frog.run();
    }
}
